import React from "react";
import { Navigate } from "react-router-dom";
const Home = React.lazy(() => import("../views/home"));
const Login = React.lazy(() => import("../views/login"));
const Search = React.lazy(() => import("../views/search"));
const Publish = React.lazy(() => import("../views/publish"));
const Detail = React.lazy(() => import("../views/detail"));

export default [
  {
    path: "/home",
    element: <Home></Home>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "/search",
    element: <Search></Search>,
  },
  {
    path: "/publish",
    element: <Publish></Publish>,
  },

  {
    path: "/detail/:id",
    element: <Detail></Detail>,
  },
  {
    path: "/",
    element: <Navigate to="/home"></Navigate>,
  },
];
